package com.java1412.controller;

import com.java1412.service.SchedualServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author java1412
 * @version 0.0.1
 * @create 2021-11-16 14:32
 * @qq 1017080724
 */
@RestController
public class HiController {
    // 编译器报错，无视。因为这个Bean是在程序启动的时候注入的，编译器感知不到，所以报错
    @Autowired
    private SchedualServiceHi schedualServiceHi;

    @GetMapping(value = "/hi")
    public String sayHi(@RequestParam String name) {
        return schedualServiceHi.sayHiFromClientOne(name);
    }
}
